package com.i.userservice.listener;

import com.i.piccommon.domain.User;
import com.i.userservice.config.MQConfig;
import com.i.userservice.domain.dto.CanalMessage;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.messaging.Message;
import org.springframework.messaging.handler.annotation.Payload;
import org.springframework.stereotype.Component;

import java.nio.channels.Channel;

/**
 * @author lewis
 * @type class
 * @description
 * @since 2024/10/26
 */
@Component
@Slf4j
public class CanalListener {
    @RabbitListener(queues = {MQConfig.CANAL_QUEUE})
    public void canalListener(String message) {
        log.info("执行了,[{}]",message);
    }
}
